var currentPage = 1;

var swiperV = new Swiper('.swiper-container', {
    direction: 'vertical', // 竖着切换
    mousewheel: true, // 鼠标控制
    //设置宽度为全屏  
    width: window.innerWidth,
    height: window.innerHeight,
    // spaceBetween: 50, // 页面间隙
    pagination: {
        el: '.swiper-pagination',
        clickable: true,
    },
    navigation: {
        nextEl: '.swiper-button-next',
    },
    on: {
        init: function () {
        },
        slideChangeTransitionEnd: function () { // 切换完执行的方法
            var num = this.activeIndex; // 当前是第几个页面
            // ......    // 这里是自己逻辑的代码

            currentPage = num + 1;

            switch (currentPage) {
                case 1:
                    audio.pause();
                    break;
                case 2:
                    audio.play();
                    break;
            }
        },
    },
});




